* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    width: 500px;
    min-height: 600px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
}

.container {
    background: white;
    border-radius: 12px;
    margin: 10px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.header h1 {
    font-size: 20px;
    color: #667eea;
    font-weight: 600;
}

.logo {
    font-size: 28px;
}

.translation-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-section, .output-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    font-size: 14px;
    font-weight: 500;
    color: #555;
}

textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

textarea[readonly] {
    background-color: #f9f9f9;
    cursor: default;
}

.control-section {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.translate-btn, .clear-btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.translate-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.translate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.translate-btn:active {
    transform: translateY(0);
}

.translate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.clear-btn {
    background: #f5f5f5;
    color: #666;
}

.clear-btn:hover {
    background: #e0e0e0;
}

.loading {
    display: inline-block;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.status-bar {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.model-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

.status-indicator {
    font-size: 12px;
}

.status-indicator.ready {
    color: #52c41a;
}

.status-indicator.loading {
    color: #faad14;
}

.status-indicator.error {
    color: #f5222d;
}

.usage-tip {
    font-size: 12px;
    color: #999;
    font-style: italic;
}

.page-translate-section {
    margin: 15px 0;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.translate-page-btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%);
    color: white;
}

.translate-page-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(82, 196, 26, 0.4);
}

.translate-page-btn:active {
    transform: translateY(0);
}

.translate-page-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}